package xyz.iguilty.workflow.core.service;

import xyz.iguilty.workflow.model.*;

import java.io.InputStream;
import java.util.List;

public interface WorkFlowInfoService {
    /**
     * 查询待办任务
     * @param criteria
     * @param pageNumber
     * @param pageSize
     * @return
     */
    PageInfo<TaskInfo> tasksTodo (TaskCriteria criteria, Integer pageNumber, Integer pageSize);

    /**
     * 查询XXX解决的任务,主要用于我发起的
     * @param criteria
     * @param pageNumber
     * @param pageSize
     * @return
     */
    PageInfo<TaskInfo> tasksResolved (TaskCriteria criteria,Integer pageNumber,Integer pageSize);

    /**
     * 查询XXX发起的流程,主要用于我发起的
     * @param criteria
     * @param pageNumber
     * @param pageSize
     * @return
     */
    PageInfo<ProcessInstanceInfo> process (ProcessInstanceCriteria criteria, Integer pageNumber, Integer pageSize);

    /**
     * 流程跟踪
     * @param processInstanceId
     * @return
     */
    InputStream track(String processInstanceId);
}
